{% extends "templates/base.html" %}

{% block title%}Home{% endblock %}

{% block main %}

			
<blockquote>
		<p>why drive by yourself, have some company, save on petrol for yourself and others....</p>
</blockquote

<a name="RoadMate"></a>
	<h2>RoadMate it!!</h2>
		
	<p><strong>Our</strong> aim is to provide the community with a car pooling service that will facilitate 
		travelling. why not to share a ride and save yourself and others the rising costs of
		petrol and also it's good to have some accompany during travel, especially if you are travelling for long
		hours..so <a href="{{ login_url }}">Sign up</a> today for an account and join our community</p>

	<p>Good luck and I hope you enjoy the experience!</p>			


{% if rides %}
	<h2> latest offered rides </h2>

	<table>
		<tr>
			<th>Ride</th>
			<th>Date</th>
			<th>Seats</th>
			<th>Owner</th>
		</tr>
		{% for ride in rides %}
			<tr class="row-a">
				<td><a href="/rideoffer?id={{ride.key.id}}">{{ ride.source.name }} - {{ ride.destination.name }}</a></td>
				<td>{{ ride.date }}</td>
				<td>{{ ride.available_seats }}</td>
				<td><a href ="/profile?user={{ride.owner.key.id}}">{{ ride.owner.user.email|local_part_from_email }}</a></td>
			</tr>
		{% endfor %}
	</table>
{% endif %}
				
								
{% endblock %}